package com.zoespeer.food_delivery_comment_api.service.impl;

import com.zoespeer.food_delivery_comment_api.mapper.CategoryMapper;
import com.zoespeer.food_delivery_comment_api.service.CategoryService;
import com.zoespeer.food_delivery_comment_api.vo.CategoryListVO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
public class CategoryServiceImpl implements CategoryService {

    private final CategoryMapper categoryMapper;

    @Override
    public CategoryListVO getAllCategories() {
        List<String> categoryNames = categoryMapper.listAllCategoryNames();
        CategoryListVO vo = new CategoryListVO();
        vo.setTypes(categoryNames);
        return vo;
    }
}